package Grasnador.Grasnador0.Generic;

import java.util.List;

public abstract class GenericBO<T> {
	protected GenericDAO<T> dao;

	public GenericBO(GenericDAO<T> dao) {
		this.dao = dao;
	}

	public boolean insert(T obj) {
		return dao.insert(obj);
	}

	public boolean update(T obj) {
		return dao.update(obj);
	}

	public boolean delete(T obj) {
		return dao.delete(obj);
	}

	public T getById(long id) {
		return dao.getById(id);
	}

	public List<T> getByName(String name) {
		return dao.getByName(name);
	}

	public List<T> getAll() {
		return dao.getAll();
	}
}